{include file="index/head" /}
<script src="/public/ueditor/ueditor.config.js"></script>
<script src="/public/ueditor/ueditor.all.js"></script>
<div class="box">
	<form method="post" action="{:url('edit')}" class="sycmsform">
		<div class="box-head">
			<h2>会员信息</h2>
			<div class="fr">
				<button type="submit" class="btn"><i class="icon-check"></i>{$v.id?'编辑':'添加'}</button>
				&nbsp;<a href="javascript:history.go(-1);" class="btn fr"><i class="icon-mail-reply (alias)"></i>返回</a></div>
		</div>
		<div class="form">
			<input type="hidden" name="id" value="{$v.id}" />
			<div class="tabcon" style="display:block;">
				<style>
					.table tr th{width:200px; text-align: right;}
			.table tr td{ text-align: left;}
		</style>
				<table cellpadding="0" cellspacing="0" class="table">
					<tr>
						<th>账号：</th>
						<td><input type="text" name="name" value="{$v.name}" class="intxt" /></td>
					</tr>
					<tr>
						<th>用户名：</th>
						<td><input type="text" name="name" value="{$v.name}" class="intxt" /></td>
					</tr>
					<tr>
						<th>头像：</th>
						<td>
							<a href="{$v.head}" class="imgview"><img src="{$v.head|default='/public/admin/images/noimg.jpg'}" style="width:100px; height:100px;"
								 alt="" /></a>
						</td>
					</tr>
					<tr>
						<th>手机号：</th>
						<td>{$v.mobile}</td>
					</tr>
					<tr>
						<th>微信号：</th>
						<td>{$v.wechatid}</td>
					</tr>
					<tr>
						<th>唯一unionid：</th>
						<td>{$v.unionid}</td>
					</tr>
					<tr>
						<th>小程序openid</th>
						<td>{$v.openid}</td>
					</tr>
					<tr>
						<th>登录token：</th>
						<td>{$v.token}</td>
					</tr>
					<tr>
						<th>性别：</th>
						<td>{if condition="$v.gender eq 1"}男{else}女{/if}</td>
					</tr>
					<tr>
						<th>是否锁定：</th>
						<td><input type="radio" name="status" {if condition="$v.status" } checked="checked" {/if} value="1" />
							是 &nbsp;&nbsp;&nbsp;
							<input type="radio" name="status" value="0" {if condition="!$v.status" } checked="checked" {/if}/> 否</td> </tr>
							 <tr>
						<th>注册时间：</th>
						<td>{$v.datetime}</td>
					</tr>
					<tr>
						<th>最后登录时间：</th>
						<td>{$v.logintime}</td>
					</tr>
					<tr>
						<th>&nbsp;</th>
						<td><button type="submit" class="button"><i class="icon-check"></i>编辑</button></td>
					</tr>
				</table>
	</form>
</div>
</div>
<script>
	sycms.submitform("{:url('index',['nid'=>$nid])}");
	layui.use('laydate', function() {
		var laydate = layui.laydate;
		laydate.render({
			elem: '#datetime' //指定元素
				,
			type: 'datetime',
			isInitValue: false
		});
	});

	function _checkbox(name) {
		var v = $("input[name=" + name + "]").val();
		v = v == 0 ? 1 : 0;
		$("input[name=" + name + "]").val(v);
	}
	$(function() {
		$(".box-head ul li").click(function() {
			$(this).addClass("on").siblings().removeClass("on");
			$(".tabcon").hide().eq($(this).index()).show();
		})
	})
</script>
